#include <iostream>

int main() {
    float N1,N2,N3,N4;
    scanf("%f%f%f%f",&N1,&N2,&N3,&N4);
    float x;
    x=(N1*2 + N2*3 + N3*4 + N4*1)/(2+3+4+1);
    printf("Media:%.1f\n",x);
    if (x>=7.0){
        printf("Aluno aprovado\n");
    } else if (x<5.0){
        printf("Aluno reprovado\n");
    } else if (x>=5.0 && x<7.0){
        printf("Aluno em exame\n");
        float y;
        scanf("%f",&y);
        printf("Nota do exame: %.1f\n",y);
        float z;
        z=(x+y)/2;
        if (z>=5.0){
            printf("Aluno aprovado\n");
        } else{
            printf("Aluno reprovado\n");
        }
        printf("Media final:%.1f",z);
    }
    return 0;
}
